<?php
include_once('./base/xcx_sqlclass.php');
$mysql=new MMsql();
$userid=$_POST['userid'];
$data=Array(
	"wk_id"			=>$_POST['wkid'],
	"user_id"		=>$_POST['userid'],
	"user_nickname"	=>$_POST['nickname'],
	"user_headimg"	=>$_POST['headimg'],
	"video_url"		=>$_POST['urls'],
	"video_type"	=>$_POST['videotype'],
	"address"		=>$_POST['address'],
	"dakadesc"		=>$_POST['desc'],
	"stu_id"		=>$_POST['stu_id'],
	"stu_name"		=>$_POST['stu_name']
);
$data=$mysql->formatVal($data);
$sql = "insert into wk_videos"."(".implode(',',array_keys($data)).") values(".implode(',',array_values($data)).")";
$result=$mysql->doSql($sql);
if($result>0){
	$re=array(
			"status"=>200,
			"msg"   =>"打卡成功！"
		);
	echo json_encode($re);
}else{
	$re=array(
			"status"=>0,
			"msg"   =>"打卡失败！"
		);
	echo json_encode($re);
}